package com.sfd.core.entity;

import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;

import java.util.Date;

/**
 * @author haden
 * @date 2022/7/26 11:07
 **/
@Data
@TableName("users")
public class User {
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;
    @TableField(value = "create_time", fill = FieldFill.INSERT)
    private Date createTime;
    @TableField(value = "update_time", fill = FieldFill.INSERT, update = "now()")
    private Date updateTime;
    private String username;
    private String password;
    private String salt;
    private String phone;
    private Integer age;
    private Date birthday;

    public User(String username, String password, String phone, Integer age, Date birthday) {
        this.username = username;
        this.password = password;
        this.phone = phone;
        this.age = age;
        this.birthday = birthday;
    }

    public User() {
    }
}
